load("//tools:apollo_package.bzl", "apollo_package", "apollo_cc_library", "apollo_component")
load("//tools:cpplint.bzl", "cpplint")

package(default_visibility = ["//visibility:public"])

LIVOX_COPTS = ['-DMODULE_NAME=\\"livox\\"']

apollo_cc_library(
    name = "livox_driver",
    srcs = glob([
         "driver/driver.cc",
         "common/*.cc",
         "livox_utils/*.cc",
    ]),
    hdrs = glob([
        "driver/driver.h",
        "livox_utils/*.h",
        "common/*.h",
    ]),
    copts = LIVOX_COPTS,
    includes = ["common", "livox_utils"],
    deps = [
        "//cyber",
        "//modules/common/util:util_tool",
        "//modules/common/util:util_lib",
        "//modules/common_msgs/sensor_msgs:pointcloud_cc_proto",
        "//modules/drivers/lidar/livox/proto:publish_config_proto",
	"//modules/drivers/lidar/livox/proto:livox_config_proto",
        "//modules/drivers/lidar/common/driver_factory:apollo_lidar_driver_base",
        "//modules/drivers/lidar/livox/livox_sdk:livox_sdk",
        "//cyber/common:cyber_common",
    ],
)

apollo_component(
    name = "liblivox_driver_component.so",
    srcs = [
        "driver/livox_driver_component.cc",
    ],
    hdrs = [
        "driver/livox_driver_component.hpp",
    ],
    deps = [
        ":livox_driver",
        "//cyber/common:cyber_common",
    ],
)

filegroup(
    name = "runtime_data",
    srcs = glob([
        "conf/*.txt",
        "conf/*.conf",
        "dag/*.dag",
        "launch/*.launch",
    ]),
)

apollo_package()
#cpplint()

